@extends('admin.layout.index')
@section('title','管理员模块')
@section('title1','管理员模块')
@section('title2','管理员列表')
@section('content')
<div class="col-lg-12">
    <div class="panel panel-default">
        <div class="panel-heading">
            &nbsp;
        </div>
        <!-- /.panel-heading -->
        <div class="panel-body">
            <div class="dataTable_wrapper">
              <div id="dataTables-example_wrapper" class="dataTables_wrapper form-inline dt-bootstrap no-footer">
                <form action="{{url('admin/manager/index')}}" method="get">
                    <div class="row">
                      <div class="col-sm-6">
                        <div class="dataTables_length" id="dataTables-example_length">
                          <label>显示
                            <select name="num" aria-controls="dataTables-example" class="form-control input-sm">
                              <option value="5">5</option>
                              <option value="10">10</option>
                              <option value="15">15</option>
                              <option value="20">20</option></select>条</label>
                        </div>
                      </div>
                      <div class="col-sm-6">
                        <div id="dataTables-example_filter" class="dataTables_filter">
                          <label>关键字:
                            <input type="search" name="search" class="form-control input-sm" placeholder="" aria-controls="dataTables-example"></label>&nbsp;&nbsp;<button class="btn btn-primary" style="height:30px">搜索</button></div>
                      </div>
                    </div>
                </form>
                <div class="row">
                  <div class="col-sm-12">
                    <table id="dataTables-example" class="table table-striped table-bordered table-hover dataTable no-footer" role="grid" aria-describedby="dataTables-example_info">
                    <thead>
	                    <tr role="row">
	                      <th style="width: 100px;">序号</th>
	                      <th style="width: 120px;">管理员账号</th>
	                      <th style="width: 200px;">权限</th>
	                      <th style="width: 100px;">操作</th>
	                    </tr>
                  	</thead>
                    <tbody>
                    @foreach($manager as $k=>$v)
	                    <tr class="gradeA odd" role="row">
                            <td class="sorting_1">{{$v->adminId}}</td>
                            <td>{{$v->adminName}}</td>
                            @if($v->permissions==1)
                            <td>超级管理员</td>
                            @else
                            <td>管理员</td>
                            @endif
                           	<td>删除|修改</td>
	                     </tr>
	                @endforeach
                     </tbody>
               </table>
               </div>
               </div>
               <div class="row">
                 <div class="col-sm-6">
                   <div class="dataTables_info" id="dataTables-example_info" role="status" aria-live="polite"></div>
                 </div>
                 <div class="col-sm-6">
                   <div class="dataTables_paginate paging_simple_numbers" id="dataTables-example_paginate">
                    {!! $manager->render() !!}
                   </div>
                 </div>
               </div>
               </div>
            </div>
            <!-- /.table-responsive -->
        </div>
        <!-- /.panel-body -->
    </div>
    <!-- /.panel -->
</div>
@endsection